package com.gxuwz.entity;

import java.io.Serializable;

import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.activerecord.Model;

/**
 * <p>
 * 
 * </p>
 *
 * @author 刘玉霜
 * @since 2017-10-27
 */
public class Sale extends Model<Sale> {

    private static final long serialVersionUID = 1L;

	private String id;
	@TableField("invoice_id")
	private String invoiceId;
	@TableField("material_id")
	private String materialId;
	@TableField("user_id")
	private String userId;
	@TableField("unit_price")
	private Double unitPrice;
	private Integer amount;
	@TableField("total_price")
	private Double totalPrice;
	private Double discount;
	@TableField("sale_time")
	private String saleTime;


	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getInvoiceId() {
		return invoiceId;
	}

	public void setInvoiceId(String invoiceId) {
		this.invoiceId = invoiceId;
	}

	public String getMaterialId() {
		return materialId;
	}

	public void setMaterialId(String materialId) {
		this.materialId = materialId;
	}

	public String getUserId() {
		return userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}

	public Double getUnitPrice() {
		return unitPrice;
	}

	public void setUnitPrice(Double unitPrice) {
		this.unitPrice = unitPrice;
	}

	public Integer getAmount() {
		return amount;
	}

	public void setAmount(Integer amount) {
		this.amount = amount;
	}

	public Double getTotalPrice() {
		return totalPrice;
	}

	public void setTotalPrice(Double totalPrice) {
		this.totalPrice = totalPrice;
	}

	public Double getDiscount() {
		return discount;
	}

	public void setDiscount(Double discount) {
		this.discount = discount;
	}

	public String getSaleTime() {
		return saleTime;
	}

	public void setSaleTime(String saleTime) {
		this.saleTime = saleTime;
	}

	@Override
	protected Serializable pkVal() {
		return this.id;
	}

	@Override
	public String toString() {
		return "Sale{" +
			", id=" + id +
			", invoiceId=" + invoiceId +
			", materialId=" + materialId +
			", userId=" + userId +
			", unitPrice=" + unitPrice +
			", amount=" + amount +
			", totalPrice=" + totalPrice +
			", discount=" + discount +
			", saleTime=" + saleTime +
			"}";
	}
}
